// Copyright 2015 Cubane Canada, Inc.  All rights reserved.
// See LICENSE for details.

/*---
esid: sec-get-set-@@species
description: Set[Symbol.species] exists per spec
info: |
  Set has a property at `Symbol.species`
author: Sam Mikes
includes: [propertyHelper.js]
features: [Symbol.species]
---*/

function Test() {
    var desc = Object.getOwnPropertyDescriptor(Set, Symbol.species);

    assert.sameValue(desc.set, undefined);
    assert.sameValue(typeof desc.get, 'function');

    verifyNotWritable(Set, Symbol.species, Symbol.species);
    verifyNotEnumerable(Set, Symbol.species);
}

// preheat
const NUMBER_OF_PREHEAT = 1;
for (let i = 0; i < NUMBER_OF_PREHEAT; i++) {
    Test();
}

ArkTools.jitCompileAsync(Test);
assert.sameValue(ArkTools.waitJitCompileFinish(Test), true, '[JIT] JIT disabled.');

// test
const NUMBER_OF_TEST = 1; // or 2
for (let i = 0; i < NUMBER_OF_TEST; i++) {
    Test();
}
